<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./node_modules/vue/dist/vue.js"></script>
</head>

<body>
  <div id="app">
    <!-- <ul>
      <li v-for="item,index in lists" :key="index">{{index}}--{{ item }}</li>
    </ul> -->
    <ul>
      <li v-for="value,key,index in obj">
        {{key}}--{{ value }}--{{index}}
      </li>
    </ul>
    <button @click="count++">按钮</button>
  </div>

  <script>
    // js 中的循环  for..in  for..of  forEach
    // vue v-for= "xx in xxs"
    // 遍历数组 v-for= "item,index in items"
    // 遍历对象 v-for= "value,key,index in obj"
    const app = new Vue({
      el: "#app",
      data: {
        lists: ["html", "js", "css"],
        obj: {
          xiaoming: {
            age: 18,
            sex: "nv"
          },
          xiaoqiang: {
            age: 18,
            sex: "nan"
          },
          xiaojia: {
            age: 18,
            sex: "nv"
          }
        }
      },

    })
  </script>

</body>

</html>
